home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11910 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.3 KB  |  52 lines

  1. Path: sun001.spd.dsccc.com!jmccarty
  2. From: jmccarty@sun1307.spd.dsccc.com (Mike McCarty)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: CONVERTING INTEGER TO ASCII??????
  5. Date: 27 Mar 1996 16:11:14 GMT
  6. Organization: DSC Communications Corporation
  7. Message-ID: <4jbpb2$pa9@sun001.spd.dsccc.com>
  8. References: <4i17r9$2kn@maltese.eag.unisysgsg.com> <4ic9ll$cfp@news.bridge.net> <danpop.827013499@rscernix> <4iv1a6$pl2@news.bridge.net>
  9. NNTP-Posting-Host: sun1307.spd.dsccc.com
  10.  
  11. In article <4iv1a6$pl2@news.bridge.net>,
  12. Gary Thompson <psycho@bridge.net> wrote:
  13. )danpop@mail.cern.ch (Dan Pop) wrote:
  14. )
  15. )>In <4ic9ll$cfp@news.bridge.net> psycho@bridge.net (Gary Thompson) writes:
  16. )
  17. )>>buff=itoa(intvalue,buff,10); (I think...)
  18. )
  19. )>And you're wrong.  There is no itoa function in the C language.
  20. )
  21. )>K&R2 contains such a function (as an example), at page 64, but it has
  22. )>only two arguments :-)
  23. )
  24. )Then what is this...  (badly copied from my C compiler)
  25. )ª----------------------------------------------------------------------------
  26. )ª                                                                           _
  27. )ª  Include:  <stdlib.h>                                                     _
  28. )ª                                                                           _
  29. )ª  Syntax:   char *itoa( int value, char *string, int radix );              _
  30. )ª            char *ltoa( long value, char *string, int radix );             _
  31. )ª            char *ultoa( unsigned long value, char *string, int radix );   _
  32. )ª                                                                           _
  33. )ª  Returns:  a pointer to <string>.                                         _
  34. )ª                                    --                                       
  35. )ª___________________________________________________________________________ª
  36.  
  37. [some control characters edited out and width reduced]
  38.  
  39. This is a routine which your link library designer decided to put in.
  40. It is not a standard C routine. Library designers are required to put
  41. certain functionality into the library. There is (AFAIK) no
  42. functionality they are required to omit. Since the C language is
  43. defined by a standard, not by an implementation, implementation
  44. arguments are irrelevant. 
  45.  
  46. Mike
  47. -- 
  48. ----
  49. char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
  50.  
  51. I don't speak for DSC.         <- They make me say that.
  52.